#include "stdafx.h"
#include "ScriptLogOutput.h"

namespace Lit
{
	namespace Editor
	{
		ScriptLogOutput::ScriptLogOutput( QWidget * parent )
			: QPlainTextEdit(parent)
		{
		}
		ScriptLogOutput::~ScriptLogOutput(){}
			
		QString ScriptLogOutput::timeStamp() const{ return QTime::currentTime().toString(); }

		void ScriptLogOutput::add( const std::string &message )
		{ 
			appendPlainText( timeStamp() + ": "+QString(message.c_str()) );
		}
	};
};